package com.im.linving.network.api;

import com.im.linving.RegisterBody;
import com.im.linving.ResForRt;

import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * @Author linyong
 * @Date 2016/10/31
 * @Time 18:09
 */
public interface IMApi {

    /**
     * 服务端注册 云信账号
     *
     * @param appKey
     * @param nonce
     * @param curTime
     * @param checkSum
     * @param accid
     * @param props
     * @param token
     * @return
     */
    @FormUrlEncoded
    @POST("user/create.action")
    Observable<ResForRt<Object>> userRegister(@Header("AppKey") String appKey, @Header("Nonce") String nonce,
                                              @Header("CurTime") String curTime, @Header("CheckSum") String checkSum,
                                              @Field("accid") String accid, @Field("props") String props, @Field("token") String token);

    @Deprecated
    @POST("user/create.action")
    Observable<ResForRt<Object>> userRegister(@Header("AppKey") String appKey, @Header("Nonce") String nonce,
                                              @Header("CurTime") String curTime, @Header("CheckSum") String checkSum,
                                              @Body RegisterBody registerBody);

}
